package com.lanchetech.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;

import com.lanchetech.entity.CourseStudy;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface CourseStudyMapper {
    int deleteByPrimaryKey(Long id);

    int insert(CourseStudy record);

    int insertSelective(CourseStudy record);

    CourseStudy selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CourseStudy record);

    int updateByPrimaryKey(CourseStudy record);

    int deleteByUserIdAndCourseId(@Param("userId")Long userId,@Param("courseId")Long courseId);

    CourseStudy findOneByUserIdAndCourseId(@Param("userId")Long userId,@Param("courseId")Long courseId);

    Long countByCourseId(@Param("courseId")Long courseId);

    List<CourseStudy> findAllByColumnIdLastThree(@Param("columnId")Long columnId);





}